import React, {Component} from 'react';

export default class Other extends Component {
    render() {
        console.log(this.props,'>>>>>')
        const {location:{state}}=this.props
        return (
            <div>
                <h2>Other:loaction state传参</h2>
                <ul>
                    <li>传递: link跳转时to传对象包括pathname state </li>
                    <li>使用：props里的location.state</li>
                </ul>
                <div>接收/other用params传递过来的参数:name:{state.name},age:{state.age}</div>
            </div>
        );
    }
}
